package com.yyf.controller;

import com.yyf.product.PayProducer;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class PayController {
    @Resource
    private PayProducer payProducer;

    @GetMapping("/pay/{id}")
    public String paySuccess(@PathVariable String id) {
        payProducer.sendPaySuccessMessage(id);
        return "支付成功:" + id;
    }
}
